﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<cludg.Web.ViewModels.CommentModel>" %>
<div id="comment_preview">
</div>
<% using (Html.BeginForm("Comment", "Story", FormMethod.Post, new Dictionary<string, object> { { "id", "commentSubmitForm" } }))
   {%>
<%: Html.ValidationSummary(true) %>
<fieldset>
	<%: Html.HiddenFor(model => model.StoryId) %>
	<%: Html.HiddenFor(model => model.CommentId) %>
	<div class="editor-label">
		<%: Html.LabelFor(model => model.CommentBody) %>
	</div>
	<div class="editor-field">
		<%: Html.TextAreaFor(model => model.CommentBody, new { @class = "text-area", @rows = "5" }) %>
<%--		<%: Html.ValidationMessageFor(model => model.CommentBody) %>--%>
	</div>
	<p>
		<%--<input type="button" value="предпросмотр" />--%>
		<input type="submit" value="сохранить" />
	</p>
</fieldset>
<div id="commentErrorMessage" style="display:none; clear:both;" class="error">Комментарий не может быть пустым.</div>
<% } %>
